import BaseAd from "../base/BaseAd";
import { SDKState } from "../../SDKDefine";
export default abstract class BaseInsertAd extends BaseAd {

    // open() {
    //     if (this.state == SDKState.loadSucess) {
    //         this.show();
    //     } else {
    //         this.preload(SDKState.open);
    //     }

    // }

    // preload(logicState: SDKState) {
    //     this.setLogicState(logicState)
    //     this.destroy();
    //     this.create();
    //     this.load();
    // }

    onLoad() {
        console.log('NativeTest BaseInsertAd onLoad')
        this.setState(SDKState.loadSucess)
    }

    show() {
        if (this.ad) {
            this.ad.show()
        }
    }

    load() {
        if (this.ad) {
            this.ad.load();
        }
    }

    onError(err) {
        console.log('NativeTest BaseInsertAd onError')
        this.setState(SDKState.loadFail)
    }

    hide(): void {

    }

}